
//
//  EventHandler.h
//  libNiblvl50_EventBus
//
//  Created by Niblit on 2010-02-19.
//  Copyright 2010 Nib_lvl50. All rights reserved.
//

//!
//! EventHandler
//!
@interface EventHandler : NSObject
{
	NSMutableDictionary* mEventListeners;
}

//!
//! Gets the shared instance of the EventHandler
//!
//! @retval EventHandler
//!
+(EventHandler*) getInstance;

//!
//! Add a listener to the event bus
//!
//! @param listener
//! @param selector
//! @param eventClass
//!
//! @throws NSException if the listener does not respond to the selector provided
//!
-(void) AddListener:(id)listener withSelector:(SEL)selector forEvent:(Class)eventClass;

//!
//! Remove a listener from the event bus
//!
//! @param listener
//! @param eventClass
//! @retval BOOL
//!
-(BOOL) RemoveListener:(id)listener forEvent:(Class)eventClass;

//!
//! Send an event
//!
//! @param event
//!
-(void) SendEvent:(id<NSObject>)event;

@end
